package com.chen.androidstudy

import android.os.Bundle
import android.util.Log
import com.base.library.base.BaseVMActivity
import com.chen.androidstudy.databinding.ActivityMainBinding
import com.chen.androidstudy.utils.GPSManage
import com.chen.androidstudy.utils.KeyStoreUtil
import com.chen.androidstudy.utils.Logger
import com.chen.androidstudy.utils.SecurityUtils
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class MainActivity : BaseVMActivity<MainViewModel, ActivityMainBinding>() {
    override fun hasSupportTitle(): Boolean {
        return false
    }

    override fun getLayoutId(): Int {
        return R.layout.activity_main
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        val checkIfSecurity = SecurityUtils.checkIfSecurity(this)
        Logger.e("chen", "checkIfSecurity:${checkIfSecurity}")
        val encryptData = KeyStoreUtil.encryptData("你好啊")
        val bytes2Hex = KeyStoreUtil.bytes2Hex(encryptData)
        Log.e("chen","----- ${bytes2Hex} ------");
        val decryptData = KeyStoreUtil.decryptData(encryptData)
        Log.e("chen","-----${decryptData}------");
    }

    override fun onDestroy() {
        super.onDestroy()
    }
}